/*
 * $Id: drv_if.h,v 1.84.6.2 Broadcom SDK $
 * 
 * $Copyright: Copyright 2011 Broadcom Corporation.
 * This program is the proprietary software of Broadcom Corporation
 * and/or its licensors, and may only be used, duplicated, modified
 * or distributed pursuant to the terms and conditions of a separate,
 * written license agreement executed between you and Broadcom
 * (an "Authorized License").  Except as set forth in an Authorized
 * License, Broadcom grants no license (express or implied), right
 * to use, or waiver of any kind with respect to the Software, and
 * Broadcom expressly reserves all rights in and to the Software
 * and all intellectual property rights therein.  IF YOU HAVE
 * NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE
 * IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
 * ALL USE OF THE SOFTWARE.  
 *  
 * Except as expressly set forth in the Authorized License,
 *  
 * 1.     This program, including its structure, sequence and organization,
 * constitutes the valuable trade secrets of Broadcom, and you shall use
 * all reasonable efforts to protect the confidentiality thereof,
 * and to use this information only in connection with your use of
 * Broadcom integrated circuit products.
 *  
 * 2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS
 * PROVIDED "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
 * REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
 * OR OTHERWISE, WITH RESPECT TO THE SOFTWARE.  BROADCOM SPECIFICALLY
 * DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
 * NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
 * ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
 * CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING
 * OUT OF USE OR PERFORMANCE OF THE SOFTWARE.
 * 
 * 3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL
 * BROADCOM OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL,
 * INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER
 * ARISING OUT OF OR IN ANY WAY RELATING TO YOUR USE OF OR INABILITY
 * TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF
 * THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE ITSELF OR USD 1.00,
 * WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING
 * ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.$
 * 
 * DO NOT EDIT THIS FILE!
 * This file is auto-generated.
 * Edits to this file will be lost when it is regenerated.
 */

#ifndef _DRV_IF_H
#define _DRV_IF_H

#include <soc/drvtypes.h>

#define _DRV_CALL(_u, _func, _pa) \
	(DRV_SERVICES(_u)->_func == 0 ? SOC_E_UNAVAIL :\
	DRV_SERVICES(_u)->_func _pa)
#define DRV_REG_READ(unit, addr, data, len)\
	 _DRV_CALL(unit, reg_read,(unit, addr, data, len)) 
#define DRV_REG_WRITE(unit, addr, data, len)\
	 _DRV_CALL(unit, reg_write,(unit, addr, data, len)) 
#define DRV_REG_LENGTH_GET(unit, reg)\
	 _DRV_CALL(unit, reg_length_get,(unit, reg)) 
#define DRV_REG_ADDR(unit, reg, port, index)\
	 _DRV_CALL(unit, reg_addr,(unit, reg, port, index)) 
#define DRV_REG_FIELD_SET(unit, reg, regbuf, field, fldbuf)\
	 _DRV_CALL(unit, reg_field_set,(unit, reg, regbuf, field, fldbuf)) 
#define DRV_REG_FIELD_GET(unit, reg, regbuf, field, fldbuf)\
	 _DRV_CALL(unit, reg_field_get,(unit, reg, regbuf, field, fldbuf)) 
#define DRV_MIIM_READ(unit, phyid, phyaddr, data)\
	 _DRV_CALL(unit, miim_read,(unit, phyid, phyaddr, data)) 
#define DRV_MIIM_WRITE(unit, phyid, phyaddr, data)\
	 _DRV_CALL(unit, miim_write,(unit, phyid, phyaddr, data)) 
#define DRV_PHY_ADDR_SET(unit, map)\
	 _DRV_CALL(unit, phy_addr_set,(unit, map)) 
#define DRV_MAC_DRIVER_SET(unit, p)\
	 _DRV_CALL(unit, mac_driver_set,(unit, p)) 
#define DRV_MEM_LENGTH_GET(unit, mem, data)\
	 _DRV_CALL(unit, mem_length_get,(unit, mem, data)) 
#define DRV_MEM_WIDTH_GET(unit, mem, data)\
	 _DRV_CALL(unit, mem_width_get,(unit, mem, data)) 
#define DRV_MEM_READ(unit, mem, entry_id, count, entry)\
	 _DRV_CALL(unit, mem_read,(unit, mem, entry_id, count, entry)) 
#define DRV_MEM_WRITE(unit, mem, entry_id, count, entry)\
	 _DRV_CALL(unit, mem_write,(unit, mem, entry_id, count, entry)) 
#define DRV_MEM_FIELD_GET(unit, mem, field_index, entry, fld_data)\
	 _DRV_CALL(unit, mem_field_get,(unit, mem, field_index, entry, fld_data)) 
#define DRV_MEM_FIELD_SET(unit, mem, field_index, entry, fld_data)\
	 _DRV_CALL(unit, mem_field_set,(unit, mem, field_index, entry, fld_data)) 
#define DRV_MEM_CLEAR(unit, mem)\
	 _DRV_CALL(unit, mem_clear,(unit, mem)) 
#define DRV_MEM_SEARCH(unit, mem, key, entry, entry1, flags)\
	 _DRV_CALL(unit, mem_search,(unit, mem, key, entry, entry1, flags)) 
#define DRV_MEM_INSERT(unit, mem, entry, flags)\
	 _DRV_CALL(unit, mem_insert,(unit, mem, entry, flags)) 
#define DRV_MEM_DELETE(unit, mem, entry, flags)\
	 _DRV_CALL(unit, mem_delete,(unit, mem, entry, flags)) 
#define DRV_MEM_CACHE_GET(unit, mem, enable)\
	 _DRV_CALL(unit, mem_cache_get,(unit, mem, enable)) 
#define DRV_MEM_CACHE_SET(unit, mem, enable)\
	 _DRV_CALL(unit, mem_cache_set,(unit, mem, enable)) 
#define DRV_MEM_MOVE(unit, mem, src_index, dest_index, count, flag)\
	 _DRV_CALL(unit, mem_move,(unit, mem, src_index, dest_index, count, flag)) 
#define DRV_MEM_FILL(unit, mem, entry_id, count, entry)\
	 _DRV_CALL(unit, mem_fill,(unit, mem, entry_id, count, entry)) 
#define DRV_COUNTER_THREAD_SET(unit, thread_op, flags, interval, bmp)\
	 _DRV_CALL(unit, counter_thread_set,(unit, thread_op, flags, interval, bmp)) 
#define DRV_COUNTER_SET(unit, bmp, counter_type, val)\
	 _DRV_CALL(unit, counter_set,(unit, bmp, counter_type, val)) 
#define DRV_COUNTER_GET(unit, port, counter_type, val)\
	 _DRV_CALL(unit, counter_get,(unit, port, counter_type, val)) 
#define DRV_COUNTER_RESET(unit)\
	 _DRV_CALL(unit, counter_reset,(unit)) 
#define DRV_VLAN_MODE_SET(unit, mode)\
	 _DRV_CALL(unit, vlan_mode_set,(unit, mode)) 
#define DRV_VLAN_MODE_GET(unit, mode)\
	 _DRV_CALL(unit, vlan_mode_get,(unit, mode)) 
#define DRV_PORT_VLAN_PVID_SET(unit, port, outer_tag, inner_tag)\
	 _DRV_CALL(unit, port_vlan_pvid_set,(unit, port, outer_tag, inner_tag)) 
#define DRV_PORT_VLAN_PVID_GET(unit, port, outer_tag, inner_tag)\
	 _DRV_CALL(unit, port_vlan_pvid_get,(unit, port, outer_tag, inner_tag)) 
#define DRV_PORT_VLAN_SET(unit, port, bmp)\
	 _DRV_CALL(unit, port_vlan_set,(unit, port, bmp)) 
#define DRV_PORT_VLAN_GET(unit, port, bmp)\
	 _DRV_CALL(unit, port_vlan_get,(unit, port, bmp)) 
#define DRV_VLAN_PROP_SET(unit, prop_type, prop_val)\
	 _DRV_CALL(unit, vlan_prop_set,(unit, prop_type, prop_val)) 
#define DRV_VLAN_PROP_GET(unit, prop_type, prop_val)\
	 _DRV_CALL(unit, vlan_prop_get,(unit, prop_type, prop_val)) 
#define DRV_VLAN_PROP_PORT_ENABLE_SET(unit, prop_type, bmp, val)\
	 _DRV_CALL(unit, vlan_prop_port_enable_set,(unit, prop_type, bmp, val)) 
#define DRV_VLAN_PROP_PORT_ENABLE_GET(unit, prop_type, port_n, val)\
	 _DRV_CALL(unit, vlan_prop_port_enable_get,(unit, prop_type, port_n, val)) 
#define DRV_VLAN_VT_SET(unit, prop_type, vid, port, prop_val)\
	 _DRV_CALL(unit, vlan_vt_set,(unit, prop_type, vid, port, prop_val)) 
#define DRV_VLAN_VT_GET(unit, prop_type, vid, port, prop_val)\
	 _DRV_CALL(unit, vlan_vt_get,(unit, prop_type, vid, port, prop_val)) 
#define DRV_VLAN_VT_ADD(unit, vt_type, port, cvid, svid, pri, mode)\
	 _DRV_CALL(unit, vlan_vt_add,(unit, vt_type, port, cvid, svid, pri, mode)) 
#define DRV_VLAN_VT_DELETE(unit, vt_type, port, vid)\
	 _DRV_CALL(unit, vlan_vt_delete,(unit, vt_type, port, vid)) 
#define DRV_VLAN_VT_DELETE_ALL(unit, vt_type)\
	 _DRV_CALL(unit, vlan_vt_delete_all,(unit, vt_type)) 
#define DRV_TRUNK_SET(unit, tid, bmp, flag, hash_op)\
	 _DRV_CALL(unit, trunk_set,(unit, tid, bmp, flag, hash_op)) 
#define DRV_TRUNK_GET(unit, tid, bmp, flag, hash_op)\
	 _DRV_CALL(unit, trunk_get,(unit, tid, bmp, flag, hash_op)) 
#define DRV_TRUNK_HASH_FIELD_ADD(unit, field_type)\
	 _DRV_CALL(unit, trunk_hash_field_add,(unit, field_type)) 
#define DRV_TRUNK_HASH_FIELD_REMOVE(unit, field_type)\
	 _DRV_CALL(unit, trunk_hash_field_remove,(unit, field_type)) 
#define DRV_QUEUE_MODE_SET(unit, bmp, mode)\
	 _DRV_CALL(unit, queue_mode_set,(unit, bmp, mode)) 
#define DRV_QUEUE_MODE_GET(unit, port, mode)\
	 _DRV_CALL(unit, queue_mode_get,(unit, port, mode)) 
#define DRV_QUEUE_COUNT_SET(unit, port_type, count)\
	 _DRV_CALL(unit, queue_count_set,(unit, port_type, count)) 
#define DRV_QUEUE_COUNT_GET(unit, port_type, count)\
	 _DRV_CALL(unit, queue_count_get,(unit, port_type, count)) 
#define DRV_QUEUE_WRR_WEIGHT_SET(unit, port_type, queue, weight)\
	 _DRV_CALL(unit, queue_WRR_weight_set,(unit, port_type, queue, weight)) 
#define DRV_QUEUE_WRR_WEIGHT_GET(unit, port_type, queue, weight)\
	 _DRV_CALL(unit, queue_WRR_weight_get,(unit, port_type, queue, weight)) 
#define DRV_QUEUE_PRIO_SET(unit, port, prio, queue_n)\
	 _DRV_CALL(unit, queue_prio_set,(unit, port, prio, queue_n)) 
#define DRV_QUEUE_PRIO_GET(unit, port, prio, queue_n)\
	 _DRV_CALL(unit, queue_prio_get,(unit, port, prio, queue_n)) 
#define DRV_QUEUE_TOS_SET(unit, precedence, queue_n)\
	 _DRV_CALL(unit, queue_tos_set,(unit, precedence, queue_n)) 
#define DRV_QUEUE_TOS_GET(unit, precedence, queue_n)\
	 _DRV_CALL(unit, queue_tos_get,(unit, precedence, queue_n)) 
#define DRV_QUEUE_DFSV_SET(unit, code_point, queue_n)\
	 _DRV_CALL(unit, queue_dfsv_set,(unit, code_point, queue_n)) 
#define DRV_QUEUE_DFSV_GET(unit, code_point, queue_n)\
	 _DRV_CALL(unit, queue_dfsv_get,(unit, code_point, queue_n)) 
#define DRV_QUEUE_MAPPING_TYPE_SET(unit, bmp, mapping_type, enable)\
	 _DRV_CALL(unit, queue_mapping_type_set,(unit, bmp, mapping_type, enable)) 
#define DRV_QUEUE_MAPPING_TYPE_GET(unit, port, mapping_type, enable)\
	 _DRV_CALL(unit, queue_mapping_type_get,(unit, port, mapping_type, enable)) 
#define DRV_AGE_TIMER_SET(unit, enable, age_time)\
	 _DRV_CALL(unit, age_timer_set,(unit, enable, age_time)) 
#define DRV_AGE_TIMER_GET(unit, enable, age_time)\
	 _DRV_CALL(unit, age_timer_get,(unit, enable, age_time)) 
#define DRV_MAC_SET(unit, pbmp, mac_type, mac, bpdu_idx)\
	 _DRV_CALL(unit, mac_set,(unit, pbmp, mac_type, mac, bpdu_idx)) 
#define DRV_MAC_GET(unit, port, mac_type, bmp, mac)\
	 _DRV_CALL(unit, mac_get,(unit, port, mac_type, bmp, mac)) 
#define DRV_MIRROR_SET(unit, enable, mport_pbmp, ingress_pbmp, engress_pbmp)\
	 _DRV_CALL(unit, mirror_set,(unit, enable, mport_pbmp, ingress_pbmp, engress_pbmp)) 
#define DRV_MIRROR_GET(unit, enable, mport_pbmp, ingress_pbmp, engress_pbmp)\
	 _DRV_CALL(unit, mirror_get,(unit, enable, mport_pbmp, ingress_pbmp, engress_pbmp)) 
#define DRV_PORT_OPER_MODE_SET(unit, bmp, oper_mode)\
	 _DRV_CALL(unit, port_oper_mode_set,(unit, bmp, oper_mode)) 
#define DRV_PORT_OPER_MODE_GET(unit, port_n, oper_mode)\
	 _DRV_CALL(unit, port_oper_mode_get,(unit, port_n, oper_mode)) 
#define DRV_PORT_SET(unit, bmp, prop_type, prop_val)\
	 _DRV_CALL(unit, port_set,(unit, bmp, prop_type, prop_val)) 
#define DRV_PORT_GET(unit, port_n, prop_type, prop_val)\
	 _DRV_CALL(unit, port_get,(unit, port_n, prop_type, prop_val)) 
#define DRV_PORT_ADVERTISE_SET(unit, bmp, prop_mask)\
	 _DRV_CALL(unit, port_advertise_set,(unit, bmp, prop_mask)) 
#define DRV_PORT_ADVERTISE_GET(unit, port_n, prop_val)\
	 _DRV_CALL(unit, port_advertise_get,(unit, port_n, prop_val)) 
#define DRV_PORT_STATUS_GET(unit, port, status_type, val)\
	 _DRV_CALL(unit, port_status_get,(unit, port, status_type, val)) 
#define DRV_PORT_SW_MAC_UPDATE(unit, bmp)\
	 _DRV_CALL(unit, port_sw_mac_update,(unit, bmp)) 
#define DRV_PORT_PRI_MAPOP_SET(unit, port, op_type, pri_old, cfi_old, pri_new, cfi_new)\
	 _DRV_CALL(unit, port_pri_mapop_set,(unit, port, op_type, pri_old, cfi_old, pri_new, cfi_new)) 
#define DRV_PORT_PRI_MAPOP_GET(unit, port, op_type, pri_old, cfi_old, pri_new, cfi_new)\
	 _DRV_CALL(unit, port_pri_mapop_get,(unit, port, op_type, pri_old, cfi_old, pri_new, cfi_new)) 
#define DRV_PORT_BITMAP_GET(unit, port_type, bmp)\
	 _DRV_CALL(unit, port_bitmap_get,(unit, port_type, bmp)) 
#define DRV_PORT_CROSS_CONNECT_SET(unit, port, bmp)\
	 _DRV_CALL(unit, port_cross_connect_set,(unit, port, bmp)) 
#define DRV_PORT_CROSS_CONNECT_GET(unit, port, bmp)\
	 _DRV_CALL(unit, port_cross_connect_get,(unit, port, bmp)) 
#define DRV_SECURITY_SET(unit, bmp, state, mask)\
	 _DRV_CALL(unit, security_set,(unit, bmp, state, mask)) 
#define DRV_SECURITY_GET(unit, port, state, mask)\
	 _DRV_CALL(unit, security_get,(unit, port, state, mask)) 
#define DRV_SECURITY_EGRESS_SET(unit, bmp, enable)\
	 _DRV_CALL(unit, security_egress_set,(unit, bmp, enable)) 
#define DRV_SECURITY_EGRESS_GET(unit, port, enable)\
	 _DRV_CALL(unit, security_egress_get,(unit, port, enable)) 
#define DRV_SECURITY_EAP_CONTROL_SET(unit, type, value)\
	 _DRV_CALL(unit, security_eap_control_set,(unit, type, value)) 
#define DRV_SECURITY_EAP_CONTROL_GET(unit, type, value)\
	 _DRV_CALL(unit, security_eap_control_get,(unit, type, value)) 
#define DRV_MSTP_CONFIG_SET(unit, vlan_id, mstp_gid)\
	 _DRV_CALL(unit, mstp_config_set,(unit, vlan_id, mstp_gid)) 
#define DRV_MSTP_CONFIG_GET(unit, vlan_id, mstp_gid)\
	 _DRV_CALL(unit, mstp_config_get,(unit, vlan_id, mstp_gid)) 
#define DRV_MSTP_PORT_SET(unit, mstp_gid, port, port_state)\
	 _DRV_CALL(unit, mstp_port_set,(unit, mstp_gid, port, port_state)) 
#define DRV_MSTP_PORT_GET(unit, mstp_gid, port, port_state)\
	 _DRV_CALL(unit, mstp_port_get,(unit, mstp_gid, port, port_state)) 
#define DRV_TRAP_SET(unit, pbmp, trap_mask)\
	 _DRV_CALL(unit, trap_set,(unit, pbmp, trap_mask)) 
#define DRV_TRAP_GET(unit, port, trap_mask)\
	 _DRV_CALL(unit, trap_get,(unit, port, trap_mask)) 
#define DRV_SNOOP_SET(unit, snoop_mask)\
	 _DRV_CALL(unit, snoop_set,(unit, snoop_mask)) 
#define DRV_SNOOP_GET(unit, snoop_mask)\
	 _DRV_CALL(unit, snoop_get,(unit, snoop_mask)) 
#define DRV_RATE_CONFIG_SET(unit, pbmp, config_type, value)\
	 _DRV_CALL(unit, rate_config_set,(unit, pbmp, config_type, value)) 
#define DRV_RATE_CONFIG_GET(unit, port, config_type, value)\
	 _DRV_CALL(unit, rate_config_get,(unit, port, config_type, value)) 
#define DRV_RATE_SET(unit, pbmp, queue_n, direction, kbits_sec_min, kbits_sec_max, burst_size)\
	 _DRV_CALL(unit, rate_set,(unit, pbmp, queue_n, direction, kbits_sec_min, kbits_sec_max, burst_size)) 
#define DRV_RATE_GET(unit, port, queue_n, direction, kbits_sec_min, kbits_sec_max, burst_size)\
	 _DRV_CALL(unit, rate_get,(unit, port, queue_n, direction, kbits_sec_min, kbits_sec_max, burst_size)) 
#define DRV_STORM_CONTROL_ENABLE_SET(unit, port, enable)\
	 _DRV_CALL(unit, storm_control_enable_set,(unit, port, enable)) 
#define DRV_STORM_CONTROL_ENABLE_GET(unit, port, enable)\
	 _DRV_CALL(unit, storm_control_enable_get,(unit, port, enable)) 
#define DRV_STORM_CONTROL_SET(unit, pbmp, type, limit, burst_size)\
	 _DRV_CALL(unit, storm_control_set,(unit, pbmp, type, limit, burst_size)) 
#define DRV_STORM_CONTROL_GET(unit, port, type, limit, burst_size)\
	 _DRV_CALL(unit, storm_control_get,(unit, port, type, limit, burst_size)) 
#define DRV_DEV_PROP_GET(unit, prop_type, prop_val)\
	 _DRV_CALL(unit, dev_prop_get,(unit, prop_type, prop_val)) 
#define DRV_DEV_PROP_SET(unit, prop_type, prop_val)\
	 _DRV_CALL(unit, dev_prop_set,(unit, prop_type, prop_val)) 
#define DRV_MCAST_INIT(unit)\
	 _DRV_CALL(unit, mcast_init,(unit)) 
#define DRV_MCAST_TO_MARL(unit, marl_entry, mcaddr)\
	 _DRV_CALL(unit, mcast_to_marl,(unit, marl_entry, mcaddr)) 
#define DRV_MCAST_FROM_MARL(unit, mcaddr, marl_entry)\
	 _DRV_CALL(unit, mcast_from_marl,(unit, mcaddr, marl_entry)) 
#define DRV_MCAST_BMP_GET(unit, entry, bmp)\
	 _DRV_CALL(unit, mcast_bmp_get,(unit, entry, bmp)) 
#define DRV_MCAST_BMP_SET(unit, entry, bmp, flag)\
	 _DRV_CALL(unit, mcast_bmp_set,(unit, entry, bmp, flag)) 
#define DRV_ARL_TABLE_PROCESS(unit, key, hw_arl, sw_arl)\
	 _DRV_CALL(unit, arl_table_process,(unit, key, hw_arl, sw_arl)) 
#define DRV_ARL_SYNC(unit, key, old_arl, new_arl)\
	 _DRV_CALL(unit, arl_sync,(unit, key, old_arl, new_arl)) 
#define DRV_ARL_LEARN_ENABLE_SET(unit, pbmp, mode)\
	 _DRV_CALL(unit, arl_learn_enable_set,(unit, pbmp, mode)) 
#define DRV_ARL_LEARN_ENABLE_GET(unit, port, mode)\
	 _DRV_CALL(unit, arl_learn_enable_get,(unit, port, mode)) 
#define DRV_QUEUE_PORT_PRIO_TO_QUEUE_SET(unit, port, prio, queue_n)\
	 _DRV_CALL(unit, queue_port_prio_to_queue_set,(unit, port, prio, queue_n)) 
#define DRV_QUEUE_PORT_PRIO_TO_QUEUE_GET(unit, port, prio, queue_n)\
	 _DRV_CALL(unit, queue_port_prio_to_queue_get,(unit, port, prio, queue_n)) 
#define DRV_QUEUE_PORT_DFSV_SET(unit, port, dscp, prio, queue_n)\
	 _DRV_CALL(unit, queue_port_dfsv_set,(unit, port, dscp, prio, queue_n)) 
#define DRV_QUEUE_PORT_DFSV_GET(unit, port, dscp, prio, queue_n)\
	 _DRV_CALL(unit, queue_port_dfsv_get,(unit, port, dscp, prio, queue_n)) 
#define DRV_QUEUE_PRIO_REMAP_SET(unit, port, pre_prio, prio)\
	 _DRV_CALL(unit, queue_prio_remap_set,(unit, port, pre_prio, prio)) 
#define DRV_QUEUE_PRIO_REMAP_GET(unit, port, pre_prio, prio)\
	 _DRV_CALL(unit, queue_prio_remap_get,(unit, port, pre_prio, prio)) 
#define DRV_QUEUE_DFSV_REMAP_SET(unit, dscp, prio)\
	 _DRV_CALL(unit, queue_dfsv_remap_set,(unit, dscp, prio)) 
#define DRV_QUEUE_DFSV_REMAP_GET(unit, dscp, prio)\
	 _DRV_CALL(unit, queue_dfsv_remap_get,(unit, dscp, prio)) 
#define DRV_QUEUE_DFSV_UNMAP_SET(unit, prio, dscp)\
	 _DRV_CALL(unit, queue_dfsv_unmap_set,(unit, prio, dscp)) 
#define DRV_QUEUE_DFSV_UNMAP_GET(unit, prio, dscp)\
	 _DRV_CALL(unit, queue_dfsv_unmap_get,(unit, prio, dscp)) 
#define DRV_QUEUE_RX_REASON_SET(unit, reason, queue)\
	 _DRV_CALL(unit, queue_rx_reason_set,(unit, reason, queue)) 
#define DRV_QUEUE_RX_REASON_GET(unit, reason, queue)\
	 _DRV_CALL(unit, queue_rx_reason_get,(unit, reason, queue)) 
#define DRV_QUEUE_PORT_TXQ_PAUSE_SET(unit, port, queue_n, enable)\
	 _DRV_CALL(unit, queue_port_txq_pause_set,(unit, port, queue_n, enable)) 
#define DRV_QUEUE_PORT_TXQ_PAUSE_GET(unit, port, queue_n, enable)\
	 _DRV_CALL(unit, queue_port_txq_pause_get,(unit, port, queue_n, enable)) 
#define DRV_QUEUE_QOS_CONTROL_SET(unit, type, state)\
	 _DRV_CALL(unit, queue_qos_control_set,(unit, type, state)) 
#define DRV_QUEUE_QOS_CONTROL_GET(unit, type, state)\
	 _DRV_CALL(unit, queue_qos_control_get,(unit, type, state)) 
#define DRV_CFP_INIT(unit)\
	 _DRV_CALL(unit, cfp_init,(unit)) 
#define DRV_CFP_ACTION_GET(unit, action, entry, act_param)\
	 _DRV_CALL(unit, cfp_action_get,(unit, action, entry, act_param)) 
#define DRV_CFP_ACTION_SET(unit, action, entry, act_param1, act_param2)\
	 _DRV_CALL(unit, cfp_action_set,(unit, action, entry, act_param1, act_param2)) 
#define DRV_CFP_CONTROL_GET(unit, control_type, param1, param2)\
	 _DRV_CALL(unit, cfp_control_get,(unit, control_type, param1, param2)) 
#define DRV_CFP_CONTROL_SET(unit, control_type, param1, param2)\
	 _DRV_CALL(unit, cfp_control_set,(unit, control_type, param1, param2)) 
#define DRV_CFP_ENTRY_READ(unit, index, ram_type, entry)\
	 _DRV_CALL(unit, cfp_entry_read,(unit, index, ram_type, entry)) 
#define DRV_CFP_ENTRY_SEARCH(unit, flags, index, entry)\
	 _DRV_CALL(unit, cfp_entry_search,(unit, flags, index, entry)) 
#define DRV_CFP_ENTRY_WRITE(unit, index, ram_type, entry)\
	 _DRV_CALL(unit, cfp_entry_write,(unit, index, ram_type, entry)) 
#define DRV_CFP_FIELD_GET(unit, mem_type, field_type, entry, fld_val)\
	 _DRV_CALL(unit, cfp_field_get,(unit, mem_type, field_type, entry, fld_val)) 
#define DRV_CFP_FIELD_SET(unit, mem_type, field_type, entry, fld_val)\
	 _DRV_CALL(unit, cfp_field_set,(unit, mem_type, field_type, entry, fld_val)) 
#define DRV_CFP_METER_RATE_TRANSFORM(unit, kbits_sec, kbits_burst, bucket_size, ref_cnt, ref_unit)\
	 _DRV_CALL(unit, cfp_meter_rate_transform,(unit, kbits_sec, kbits_burst, bucket_size, ref_cnt, ref_unit)) 
#define DRV_CFP_METER_GET(unit, entry, kbits_sec, kbits_burst)\
	 _DRV_CALL(unit, cfp_meter_get,(unit, entry, kbits_sec, kbits_burst)) 
#define DRV_CFP_METER_SET(unit, entry, kbits_sec, kbits_burst)\
	 _DRV_CALL(unit, cfp_meter_set,(unit, entry, kbits_sec, kbits_burst)) 
#define DRV_CFP_QSET_GET(unit, qual, entry, val)\
	 _DRV_CALL(unit, cfp_qset_get,(unit, qual, entry, val)) 
#define DRV_CFP_QSET_SET(unit, qual, entry, val)\
	 _DRV_CALL(unit, cfp_qset_set,(unit, qual, entry, val)) 
#define DRV_CFP_SLICE_ID_SELECT(unit, entry, slice_id, flags)\
	 _DRV_CALL(unit, cfp_slice_id_select,(unit, entry, slice_id, flags)) 
#define DRV_CFP_SLICE_TO_QSET(unit, slice_id, entry)\
	 _DRV_CALL(unit, cfp_slice_to_qset,(unit, slice_id, entry)) 
#define DRV_CFP_STAT_GET(unit, stat_type, index, counter)\
	 _DRV_CALL(unit, cfp_stat_get,(unit, stat_type, index, counter)) 
#define DRV_CFP_STAT_SET(unit, stat_type, index, counter)\
	 _DRV_CALL(unit, cfp_stat_set,(unit, stat_type, index, counter)) 
#define DRV_CFP_UDF_GET(unit, port, udf_index, offset, base)\
	 _DRV_CALL(unit, cfp_udf_get,(unit, port, udf_index, offset, base)) 
#define DRV_CFP_UDF_SET(unit, port, udf_index, offset, base)\
	 _DRV_CALL(unit, cfp_udf_set,(unit, port, udf_index, offset, base)) 
#define DRV_CFP_RANGER(unit, flags, min, max)\
	 _DRV_CALL(unit, cfp_ranger,(unit, flags, min, max)) 
#define DRV_CFP_RANGE_SET(unit, type, id, param1, param2)\
	 _DRV_CALL(unit, cfp_range_set,(unit, type, id, param1, param2)) 
#define DRV_CFP_RANGE_GET(unit, type, id, param1, param2)\
	 _DRV_CALL(unit, cfp_range_get,(unit, type, id, param1, param2)) 
#define DRV_CFP_SUB_QUAL_BY_UDF(unit, enable, slice_id, sub_qual, qual_udf_info)\
	 _DRV_CALL(unit, cfp_sub_qual_by_udf,(unit, enable, slice_id, sub_qual, qual_udf_info)) 
#define DRV_EAV_CONTROL_SET(unit, type, param)\
	 _DRV_CALL(unit, eav_control_set,(unit, type, param)) 
#define DRV_EAV_CONTROL_GET(unit, type, param)\
	 _DRV_CALL(unit, eav_control_get,(unit, type, param)) 
#define DRV_EAV_ENABLE_SET(unit, port, enable)\
	 _DRV_CALL(unit, eav_enable_set,(unit, port, enable)) 
#define DRV_EAV_ENABLE_GET(unit, port, enable)\
	 _DRV_CALL(unit, eav_enable_get,(unit, port, enable)) 
#define DRV_EAV_LINK_STATUS_SET(unit, port, link)\
	 _DRV_CALL(unit, eav_link_status_set,(unit, port, link)) 
#define DRV_EAV_LINK_STATUS_GET(unit, port, link)\
	 _DRV_CALL(unit, eav_link_status_get,(unit, port, link)) 
#define DRV_EAV_EGRESS_TIMESTAMP_GET(unit, port, param)\
	 _DRV_CALL(unit, eav_egress_timestamp_get,(unit, port, param)) 
#define DRV_EAV_TIME_SYNC_SET(unit, type, p0, p1)\
	 _DRV_CALL(unit, eav_time_sync_set,(unit, type, p0, p1)) 
#define DRV_EAV_TIME_SYNC_GET(unit, type, p0, p1)\
	 _DRV_CALL(unit, eav_time_sync_get,(unit, type, p0, p1)) 
#define DRV_EAV_QUEUE_CONTROL_SET(unit, port, type, param)\
	 _DRV_CALL(unit, eav_queue_control_set,(unit, port, type, param)) 
#define DRV_EAV_QUEUE_CONTROL_GET(unit, port, type, param)\
	 _DRV_CALL(unit, eav_queue_control_get,(unit, port, type, param)) 
#define DRV_EAV_TIME_SYNC_MAC_SET(unit, mac, ethertype)\
	 _DRV_CALL(unit, eav_time_sync_mac_set,(unit, mac, ethertype)) 
#define DRV_EAV_TIME_SYNC_MAC_GET(unit, mac, ethertype)\
	 _DRV_CALL(unit, eav_time_sync_mac_get,(unit, mac, ethertype)) 
#define DRV_DOS_ENABLE_SET(unit, type, param)\
	 _DRV_CALL(unit, dos_enable_set,(unit, type, param)) 
#define DRV_DOS_ENABLE_GET(unit, type, param)\
	 _DRV_CALL(unit, dos_enable_get,(unit, type, param)) 
#define DRV_DOS_EVENT_BITMAP_GET(unit, op, event_bitmap)\
	 _DRV_CALL(unit, dos_event_bitmap_get,(unit, op, event_bitmap)) 
#define DRV_VM_INIT(unit)\
	 _DRV_CALL(unit, vm_init,(unit)) 
#define DRV_VM_DEINIT(unit)\
	 _DRV_CALL(unit, vm_deinit,(unit)) 
#define DRV_VM_FIELD_GET(unit, mem_type, field_type, entry, fld_val)\
	 _DRV_CALL(unit, vm_field_get,(unit, mem_type, field_type, entry, fld_val)) 
#define DRV_VM_FIELD_SET(unit, mem_type, field_type, entry, fld_val)\
	 _DRV_CALL(unit, vm_field_set,(unit, mem_type, field_type, entry, fld_val)) 
#define DRV_VM_ACTION_GET(unit, action, entry, act_param)\
	 _DRV_CALL(unit, vm_action_get,(unit, action, entry, act_param)) 
#define DRV_VM_ACTION_SET(unit, action, entry, act_param)\
	 _DRV_CALL(unit, vm_action_set,(unit, action, entry, act_param)) 
#define DRV_VM_ENTRY_READ(unit, index, ram_type, entry)\
	 _DRV_CALL(unit, vm_entry_read,(unit, index, ram_type, entry)) 
#define DRV_VM_ENTRY_WRITE(unit, index, ram_type, entry)\
	 _DRV_CALL(unit, vm_entry_write,(unit, index, ram_type, entry)) 
#define DRV_VM_QSET_GET(unit, qual, entry, val)\
	 _DRV_CALL(unit, vm_qset_get,(unit, qual, entry, val)) 
#define DRV_VM_QSET_SET(unit, qual, entry, val)\
	 _DRV_CALL(unit, vm_qset_set,(unit, qual, entry, val)) 
#define DRV_VM_FORMAT_ID_SELECT(unit, entry, format_id, flags)\
	 _DRV_CALL(unit, vm_format_id_select,(unit, entry, format_id, flags)) 
#define DRV_VM_FORMAT_TO_QSET(unit, mem_type, id, entry)\
	 _DRV_CALL(unit, vm_format_to_qset,(unit, mem_type, id, entry)) 
#define DRV_VM_RANGE_SET(unit, id, min, max)\
	 _DRV_CALL(unit, vm_range_set,(unit, id, min, max)) 
#define DRV_VM_FLOW_ALLOC(unit, type, flow_id)\
	 _DRV_CALL(unit, vm_flow_alloc,(unit, type, flow_id)) 
#define DRV_VM_FLOW_FREE(unit, flow_id)\
	 _DRV_CALL(unit, vm_flow_free,(unit, flow_id)) 
#define DRV_VM_RANGER_INC(unit, ranger_id)\
	 _DRV_CALL(unit, vm_ranger_inc,(unit, ranger_id)) 
#define DRV_VM_RANGER_DEC(unit, ranger_id)\
	 _DRV_CALL(unit, vm_ranger_dec,(unit, ranger_id)) 
#define DRV_VM_RANGER_COUNT_GET(unit, ranger_id, count)\
	 _DRV_CALL(unit, vm_ranger_count_get,(unit, ranger_id, count)) 
#define DRV_MCREP_VPGRP_VPORT_CONFIG_SET(unit, mc_group, port, op, param)\
	 _DRV_CALL(unit, mcrep_vpgrp_vport_config_set,(unit, mc_group, port, op, param)) 
#define DRV_MCREP_VPGRP_VPORT_CONFIG_GET(unit, mc_group, port, op, param)\
	 _DRV_CALL(unit, mcrep_vpgrp_vport_config_get,(unit, mc_group, port, op, param)) 
#define DRV_MCREP_VPORT_CONFIG_SET(unit, port, op, vport, vid)\
	 _DRV_CALL(unit, mcrep_vport_config_set,(unit, port, op, vport, vid)) 
#define DRV_MCREP_VPORT_CONFIG_GET(unit, port, op, vport, vid)\
	 _DRV_CALL(unit, mcrep_vport_config_get,(unit, port, op, vport, vid)) 
#define DRV_MCREP_VPORT_VID_SEARCH(unit, port, vport, param)\
	 _DRV_CALL(unit, mcrep_vport_vid_search,(unit, port, vport, param)) 
#define DRV_DEV_CONTROL_SET(unit, ctrl_cnt, type_list, value_list)\
	 _DRV_CALL(unit, dev_control_set,(unit, ctrl_cnt, type_list, value_list)) 
#define DRV_DEV_CONTROL_GET(unit, ctrl_cnt, type_list, value_list)\
	 _DRV_CALL(unit, dev_control_get,(unit, ctrl_cnt, type_list, value_list)) 
#define DRV_ARL_LEARN_COUNT_SET(unit, port, type, value)\
	 _DRV_CALL(unit, arl_learn_count_set,(unit, port, type, value)) 
#define DRV_ARL_LEARN_COUNT_GET(unit, port, type, value)\
	 _DRV_CALL(unit, arl_learn_count_get,(unit, port, type, value)) 
#define DRV_FP_INIT(unit, stage_id)\
	 _DRV_CALL(unit, fp_init,(unit, stage_id)) 
#define DRV_FP_DEINIT(unit, stage_id)\
	 _DRV_CALL(unit, fp_deinit,(unit, stage_id)) 
#define DRV_FP_QUAL_VALUE_SET(unit, stage_id, qual, drv_entry, p_data, p_mask)\
	 _DRV_CALL(unit, fp_qual_value_set,(unit, stage_id, qual, drv_entry, p_data, p_mask)) 
#define DRV_FP_QUAL_VALUE_GET(unit, stage_id, qual, drv_entry, p_data, p_mask)\
	 _DRV_CALL(unit, fp_qual_value_get,(unit, stage_id, qual, drv_entry, p_data, p_mask)) 
#define DRV_FP_UDF_VALUE_SET(unit, stage_id, udf_idex, drv_entry, p_data, p_mask)\
	 _DRV_CALL(unit, fp_udf_value_set,(unit, stage_id, udf_idex, drv_entry, p_data, p_mask)) 
#define DRV_FP_UDF_VALUE_GET(unit, stage_id, udf_idex, drv_entry, p_data, p_mask)\
	 _DRV_CALL(unit, fp_udf_value_get,(unit, stage_id, udf_idex, drv_entry, p_data, p_mask)) 
#define DRV_FP_ENTRY_MEM_CONTROL(unit, stage_id, op, src_entry, dst_entry, alloc_entry)\
	 _DRV_CALL(unit, fp_entry_mem_control,(unit, stage_id, op, src_entry, dst_entry, alloc_entry)) 
#define DRV_FP_ENTRY_TCAM_CONTROL(unit, stage_id, drv_entry, op, param1, param2)\
	 _DRV_CALL(unit, fp_entry_tcam_control,(unit, stage_id, drv_entry, op, param1, param2)) 
#define DRV_FP_ACTION_CONFLICT(unit, stage_id, act1, act2)\
	 _DRV_CALL(unit, fp_action_conflict,(unit, stage_id, act1, act2)) 
#define DRV_FP_ACTION_SUPPORT_CHECK(unit, stage_id, action)\
	 _DRV_CALL(unit, fp_action_support_check,(unit, stage_id, action)) 
#define DRV_FP_ACTION_ADD(unit, stage_id, drv_entry, action, param0, param1)\
	 _DRV_CALL(unit, fp_action_add,(unit, stage_id, drv_entry, action, param0, param1)) 
#define DRV_FP_ACTION_REMOVE(unit, stage_id, drv_entry, action, param0, param1)\
	 _DRV_CALL(unit, fp_action_remove,(unit, stage_id, drv_entry, action, param0, param1)) 
#define DRV_FP_SELCODE_MODE_GET(unit, stage_id, qset, mode, slice_id, slice_map, drv_entry)\
	 _DRV_CALL(unit, fp_selcode_mode_get,(unit, stage_id, qset, mode, slice_id, slice_map, drv_entry)) 
#define DRV_FP_SELCODE_TO_QSET(unit, stage_id, slice_id, qset)\
	 _DRV_CALL(unit, fp_selcode_to_qset,(unit, stage_id, slice_id, qset)) 
#define DRV_FP_QUALIFY_SUPPORT(unit, stage_id, qset)\
	 _DRV_CALL(unit, fp_qualify_support,(unit, stage_id, qset)) 
#define DRV_FP_ID_CONTROL(unit, type, op, flags, id, count)\
	 _DRV_CALL(unit, fp_id_control,(unit, type, op, flags, id, count)) 
#define DRV_FP_TCAM_PARITY_CHECK(unit, drv_fp_tcam_chksum)\
	 _DRV_CALL(unit, fp_tcam_parity_check,(unit, drv_fp_tcam_chksum)) 
#define DRV_FP_POLICER_CONTROL(unit, stage_id, op, entry, policer_cfg)\
	 _DRV_CALL(unit, fp_policer_control,(unit, stage_id, op, entry, policer_cfg)) 
#define DRV_FP_STAT_SUPPORT_CHECK(unit, stage_id, op, param0, mode)\
	 _DRV_CALL(unit, fp_stat_support_check,(unit, stage_id, op, param0, mode)) 
#define DRV_FP_STAT_TYPE_GET(unit, stage_id, policer_mode, stat, type1, type2, type3)\
	 _DRV_CALL(unit, fp_stat_type_get,(unit, stage_id, policer_mode, stat, type1, type2, type3)) 
#define DRV_PORT_BLOCK_GET(unit, port, block_type, egress_pbmp)\
	 _DRV_CALL(unit, port_block_get,(unit, port, block_type, egress_pbmp)) 
#define DRV_PORT_BLOCK_SET(unit, port, block_type, egress_pbmp)\
	 _DRV_CALL(unit, port_block_set,(unit, port, block_type, egress_pbmp)) 
#define DRV_LED_FUNC_GET(unit, led_group, led_functions)\
	 _DRV_CALL(unit, led_func_get,(unit, led_group, led_functions)) 
#define DRV_LED_FUNC_SET(unit, led_group, led_functions)\
	 _DRV_CALL(unit, led_func_set,(unit, led_group, led_functions)) 
#define DRV_LED_FUNCGRP_SELECT_GET(unit, port, led_group)\
	 _DRV_CALL(unit, led_funcgrp_select_get,(unit, port, led_group)) 
#define DRV_LED_FUNCGRP_SELECT_SET(unit, port, led_group)\
	 _DRV_CALL(unit, led_funcgrp_select_set,(unit, port, led_group)) 
#define DRV_LED_MODE_GET(unit, port, led_mode)\
	 _DRV_CALL(unit, led_mode_get,(unit, port, led_mode)) 
#define DRV_LED_MODE_SET(unit, port, led_mode)\
	 _DRV_CALL(unit, led_mode_set,(unit, port, led_mode)) 
#define DRV_IGMP_MLD_SNOOP_MODE_GET(unit, type, mode)\
	 _DRV_CALL(unit, igmp_mld_snoop_mode_get,(unit, type, mode)) 
#define DRV_IGMP_MLD_SNOOP_MODE_SET(unit, type, mode)\
	 _DRV_CALL(unit, igmp_mld_snoop_mode_set,(unit, type, mode)) 


typedef struct{ 
	int (*reg_read)(int unit,uint32 addr,void *data,int len);
	int (*reg_write)(int unit,uint32 addr,void *data,int len);
	int (*reg_length_get)(int unit,uint32 reg);
	uint32 (*reg_addr)(int unit,uint32 reg,int port,int index);
	int (*reg_field_set)(int unit,uint32 reg,uint32 *regbuf,uint32 field,uint32 *fldbuf);
	int (*reg_field_get)(int unit,uint32 reg,uint32 *regbuf,uint32 field,uint32 *fldbuf);
	int (*miim_read)(int unit,uint8 phyid,uint8 phyaddr,uint16 *data);
	int (*miim_write)(int unit,uint8 phyid,uint8 phyaddr,uint16 data);
	int (*phy_addr_set)(int unit,int **map);
	int (*mac_driver_set)(int unit,uint32 **p);
	int (*mem_length_get)(int unit,uint32 mem,uint32 *data);
	int (*mem_width_get)(int unit,uint32 mem,uint32 *data);
	int (*mem_read)(int unit,uint32 mem,uint32 entry_id,uint32 count,uint32 *entry);
	int (*mem_write)(int unit,uint32 mem,uint32 entry_id,uint32 count,uint32 *entry);
	int (*mem_field_get)(int unit,uint32 mem,uint32 field_index,uint32 *entry,uint32 *fld_data);
	int (*mem_field_set)(int unit,uint32 mem,uint32 field_index,uint32 *entry,uint32 *fld_data);
	int (*mem_clear)(int unit,uint32 mem);
	int (*mem_search)(int unit,uint32 mem,uint32 *key,uint32 *entry,uint32 *entry1,uint32 flags);
	int (*mem_insert)(int unit,uint32 mem,uint32 *entry,uint32 flags);
	int (*mem_delete)(int unit,uint32 mem,uint32 *entry,uint32 flags);
	int (*mem_cache_get)(int unit,uint32 mem,uint32 *enable);
	int (*mem_cache_set)(int unit,uint32 mem,uint32 enable);
	int (*mem_move)(int unit,uint32 mem,int src_index,int dest_index,int count,int flag);
	int (*mem_fill)(int unit,uint32 mem,int entry_id,int count,uint32 *entry);
	int (*counter_thread_set)(int unit,uint32 thread_op,uint32 flags,int interval,soc_pbmp_t bmp);
	int (*counter_set)(int unit,soc_pbmp_t bmp,uint32 counter_type,uint64 val);
	int (*counter_get)(int unit,uint32 port,uint32 counter_type,uint64 *val);
	int (*counter_reset)(int unit);
	int (*vlan_mode_set)(int unit,uint32 mode);
	int (*vlan_mode_get)(int unit,uint32 *mode);
	int (*port_vlan_pvid_set)(int unit,uint32 port,uint32 outer_tag,uint32 inner_tag);
	int (*port_vlan_pvid_get)(int unit,uint32 port,uint32 *outer_tag,uint32 *inner_tag);
	int (*port_vlan_set)(int unit,uint32 port,soc_pbmp_t bmp);
	int (*port_vlan_get)(int unit,uint32 port,soc_pbmp_t *bmp);
	int (*vlan_prop_set)(int unit,uint32 prop_type,uint32 prop_val);
	int (*vlan_prop_get)(int unit,uint32 prop_type,uint32 *prop_val);
	int (*vlan_prop_port_enable_set)(int unit,uint32 prop_type,soc_pbmp_t bmp,uint32 val);
	int (*vlan_prop_port_enable_get)(int unit,uint32 prop_type,uint32 port_n,uint32 *val);
	int (*vlan_vt_set)(int unit,uint32 prop_type,uint32 vid,uint32 port,uint32 prop_val);
	int (*vlan_vt_get)(int unit,uint32 prop_type,uint32 vid,uint32 port,uint32 *prop_val);
	int (*vlan_vt_add)(int unit,uint32 vt_type,uint32 port,uint32 cvid,uint32 svid,uint32 pri,uint32 mode);
	int (*vlan_vt_delete)(int unit,uint32 vt_type,uint32 port,uint32 vid);
	int (*vlan_vt_delete_all)(int unit,uint32 vt_type);
	int (*trunk_set)(int unit,int tid,soc_pbmp_t bmp,uint32 flag,uint32 hash_op);
	int (*trunk_get)(int unit,int tid,soc_pbmp_t *bmp,uint32 flag,uint32 *hash_op);
	int (*trunk_hash_field_add)(int unit,uint32 field_type);
	int (*trunk_hash_field_remove)(int unit,uint32 field_type);
	int (*queue_mode_set)(int unit,soc_pbmp_t bmp,uint32 mode);
	int (*queue_mode_get)(int unit,uint32 port,uint32 *mode);
	int (*queue_count_set)(int unit,uint32 port_type,uint8 count);
	int (*queue_count_get)(int unit,uint32 port_type,uint8 *count);
	int (*queue_WRR_weight_set)(int unit,uint32 port_type,uint8 queue,uint32 weight);
	int (*queue_WRR_weight_get)(int unit,uint32 port_type,uint8 queue,uint32 *weight);
	int (*queue_prio_set)(int unit,uint32 port,uint8 prio,uint8 queue_n);
	int (*queue_prio_get)(int unit,uint32 port,uint8 prio,uint8 *queue_n);
	int (*queue_tos_set)(int unit,uint8 precedence,uint8 queue_n);
	int (*queue_tos_get)(int unit,uint8 precedence,uint8 *queue_n);
	int (*queue_dfsv_set)(int unit,uint8 code_point,uint8 queue_n);
	int (*queue_dfsv_get)(int unit,uint8 code_point,uint8 *queue_n);
	int (*queue_mapping_type_set)(int unit,soc_pbmp_t bmp,uint32 mapping_type,uint8 enable);
	int (*queue_mapping_type_get)(int unit,uint32 port,uint32 mapping_type,uint8 *enable);
	int (*age_timer_set)(int unit,uint32 enable,uint32 age_time);
	int (*age_timer_get)(int unit,uint32 *enable,uint32 *age_time);
	int (*mac_set)(int unit,soc_pbmp_t pbmp,uint32 mac_type,uint8 *mac,uint32 bpdu_idx);
	int (*mac_get)(int unit,uint32 port,uint32 mac_type,soc_pbmp_t *bmp,uint8 *mac);
	int (*mirror_set)(int unit,uint32 enable,soc_pbmp_t mport_pbmp,soc_pbmp_t ingress_pbmp,soc_pbmp_t engress_pbmp);
	int (*mirror_get)(int unit,uint32 *enable,soc_pbmp_t *mport_pbmp,soc_pbmp_t *ingress_pbmp,soc_pbmp_t *engress_pbmp);
	int (*port_oper_mode_set)(int unit,soc_pbmp_t bmp,uint32 oper_mode);
	int (*port_oper_mode_get)(int unit,int port_n,uint32 *oper_mode);
	int (*port_set)(int unit,soc_pbmp_t bmp,uint32 prop_type,uint32 prop_val);
	int (*port_get)(int unit,int port_n,uint32 prop_type,uint32 *prop_val);
	int (*port_advertise_set)(int unit,soc_pbmp_t bmp,uint32 prop_mask);
	int (*port_advertise_get)(int unit,int port_n,uint32 *prop_val);
	int (*port_status_get)(int unit,uint32 port,uint32 status_type,uint32 *val);
	int (*port_sw_mac_update)(int unit,soc_pbmp_t bmp);
	int (*port_pri_mapop_set)(int unit,int port,int op_type,uint32 pri_old,uint32 cfi_old,uint32 pri_new,uint32 cfi_new);
	int (*port_pri_mapop_get)(int unit,int port,int op_type,uint32 pri_old,uint32 cfi_old,uint32 *pri_new,uint32 *cfi_new);
	int (*port_bitmap_get)(int unit,uint32 port_type,soc_pbmp_t *bmp);
	int (*port_cross_connect_set)(int unit,uint32 port,soc_pbmp_t bmp);
	int (*port_cross_connect_get)(int unit,uint32 port,soc_pbmp_t *bmp);
	int (*security_set)(int unit,soc_pbmp_t bmp,uint32 state,uint32 mask);
	int (*security_get)(int unit,uint32 port,uint32 *state,uint32 *mask);
	int (*security_egress_set)(int unit,soc_pbmp_t bmp,int enable);
	int (*security_egress_get)(int unit,int port,int *enable);
	int (*security_eap_control_set)(int unit,uint32 type,uint32 value);
	int (*security_eap_control_get)(int unit,uint32 type,uint32 *value);
	int (*mstp_config_set)(int unit,uint32 vlan_id,uint32 mstp_gid);
	int (*mstp_config_get)(int unit,uint32 vlan_id,uint32 *mstp_gid);
	int (*mstp_port_set)(int unit,uint32 mstp_gid,uint32 port,uint32 port_state);
	int (*mstp_port_get)(int unit,uint32 mstp_gid,uint32 port,uint32 *port_state);
	int (*trap_set)(int unit,soc_pbmp_t pbmp,uint32 trap_mask);
	int (*trap_get)(int unit,soc_port_t port,uint32 *trap_mask);
	int (*snoop_set)(int unit,uint32 snoop_mask);
	int (*snoop_get)(int unit,uint32 *snoop_mask);
	int (*rate_config_set)(int unit,soc_pbmp_t pbmp,uint32 config_type,uint32 value);
	int (*rate_config_get)(int unit,uint32 port,uint32 config_type,uint32 *value);
	int (*rate_set)(int unit,soc_pbmp_t pbmp,uint8 queue_n,int direction,uint32 kbits_sec_min,uint32 kbits_sec_max,uint32 burst_size);
	int (*rate_get)(int unit,uint32 port,uint8 queue_n,int direction,uint32 *kbits_sec_min,uint32 *kbits_sec_max,uint32 *burst_size);
	int (*storm_control_enable_set)(int unit,uint32 port,uint8 enable);
	int (*storm_control_enable_get)(int unit,uint32 port,uint8 *enable);
	int (*storm_control_set)(int unit,soc_pbmp_t pbmp,uint32 type,uint32 limit,uint32 burst_size);
	int (*storm_control_get)(int unit,uint32 port,uint32 *type,uint32 *limit,uint32 *burst_size);
	int (*dev_prop_get)(int unit,uint32 prop_type,uint32 *prop_val);
	int (*dev_prop_set)(int unit,uint32 prop_type,uint32 prop_val);
	int (*mcast_init)(int unit);
	int (*mcast_to_marl)(int unit,uint32 *marl_entry,uint32 *mcaddr);
	int (*mcast_from_marl)(int unit,uint32 *mcaddr,uint32 *marl_entry);
	int (*mcast_bmp_get)(int unit,uint32 *entry,soc_pbmp_t *bmp);
	int (*mcast_bmp_set)(int unit,uint32 *entry,soc_pbmp_t bmp,uint32 flag);
	int (*arl_table_process)(int unit,uint32 *key,void *hw_arl,void *sw_arl);
	int (*arl_sync)(int unit,uint32 *key,void *old_arl,void *new_arl);
	int (*arl_learn_enable_set)(int unit,soc_pbmp_t pbmp,uint32 mode);
	int (*arl_learn_enable_get)(int unit,soc_port_t port,uint32 *mode);
	int (*queue_port_prio_to_queue_set)(int unit,uint8 port,uint8 prio,uint8 queue_n);
	int (*queue_port_prio_to_queue_get)(int unit,uint8 port,uint8 prio,uint8 *queue_n);
	int (*queue_port_dfsv_set)(int unit,uint8 port,uint8 dscp,uint8 prio,uint8 queue_n);
	int (*queue_port_dfsv_get)(int unit,uint8 port,uint8 dscp,uint8 *prio,uint8 *queue_n);
	int (*queue_prio_remap_set)(int unit,uint32 port,uint8 pre_prio,uint8 prio);
	int (*queue_prio_remap_get)(int unit,uint32 port,uint8 pre_prio,uint8 *prio);
	int (*queue_dfsv_remap_set)(int unit,uint8 dscp,uint8 prio);
	int (*queue_dfsv_remap_get)(int unit,uint8 dscp,uint8 *prio);
	int (*queue_dfsv_unmap_set)(int unit,uint8 prio,uint8 dscp);
	int (*queue_dfsv_unmap_get)(int unit,uint8 prio,uint8 *dscp);
	int (*queue_rx_reason_set)(int unit,uint8 reason,uint32 queue);
	int (*queue_rx_reason_get)(int unit,uint8 reason,uint32 *queue);
	int (*queue_port_txq_pause_set)(int unit,uint32 port,uint8 queue_n,uint8 enable);
	int (*queue_port_txq_pause_get)(int unit,uint32 port,uint8 queue_n,uint8 *enable);
	int (*queue_qos_control_set)(int unit,uint32 type,uint32 state);
	int (*queue_qos_control_get)(int unit,uint32 type,uint32 *state);
	int (*cfp_init)(int unit);
	int (*cfp_action_get)(int unit,uint32 *action,drv_cfp_entry_t *entry,uint32 *act_param);
	int (*cfp_action_set)(int unit,uint32 action,drv_cfp_entry_t *entry,uint32 act_param1,uint32 act_param2);
	int (*cfp_control_get)(int unit,uint32 control_type,uint32 param1,uint32 *param2);
	int (*cfp_control_set)(int unit,uint32 control_type,uint32 param1,uint32 param2);
	int (*cfp_entry_read)(int unit,uint32 index,uint32 ram_type,drv_cfp_entry_t *entry);
	int (*cfp_entry_search)(int unit,uint32 flags,uint32 *index,drv_cfp_entry_t *entry);
	int (*cfp_entry_write)(int unit,uint32 index,uint32 ram_type,drv_cfp_entry_t *entry);
	int (*cfp_field_get)(int unit,uint32 mem_type,uint32 field_type,drv_cfp_entry_t *entry,uint32 *fld_val);
	int (*cfp_field_set)(int unit,uint32 mem_type,uint32 field_type,drv_cfp_entry_t *entry,uint32 *fld_val);
	int (*cfp_meter_rate_transform)(int unit,uint32 kbits_sec,uint32 kbits_burst,uint32 *bucket_size,uint32 *ref_cnt,uint32 *ref_unit);
	int (*cfp_meter_get)(int unit,drv_cfp_entry_t *entry,uint32 *kbits_sec,uint32 *kbits_burst);
	int (*cfp_meter_set)(int unit,drv_cfp_entry_t *entry,uint32 kbits_sec,uint32 kbits_burst);
	int (*cfp_qset_get)(int unit,uint32 qual,drv_cfp_entry_t *entry,uint32 *val);
	int (*cfp_qset_set)(int unit,uint32 qual,drv_cfp_entry_t *entry,uint32 val);
	int (*cfp_slice_id_select)(int unit,drv_cfp_entry_t *entry,uint32 *slice_id,uint32 flags);
	int (*cfp_slice_to_qset)(int unit,uint32 slice_id,drv_cfp_entry_t *entry);
	int (*cfp_stat_get)(int unit,uint32 stat_type,uint32 index,uint32 *counter);
	int (*cfp_stat_set)(int unit,uint32 stat_type,uint32 index,uint32 counter);
	int (*cfp_udf_get)(int unit,uint32 port,uint32 udf_index,uint32 *offset,uint32 *base);
	int (*cfp_udf_set)(int unit,uint32 port,uint32 udf_index,uint32 offset,uint32 base);
	int (*cfp_ranger)(int unit,uint32 flags,uint32 min,uint32 max);
	int (*cfp_range_set)(int unit,uint32 type,uint32 id,uint32 param1,uint32 param2);
	int (*cfp_range_get)(int unit,uint32 type,uint32 id,uint32 *param1,uint32 *param2);
	int (*cfp_sub_qual_by_udf)(int unit,int enable,int slice_id,uint32 sub_qual,drv_cfp_qual_udf_info_t *qual_udf_info);
	int (*eav_control_set)(int unit,uint32 type,uint32 param);
	int (*eav_control_get)(int unit,uint32 type,uint32 *param);
	int (*eav_enable_set)(int unit,uint32 port,uint32 enable);
	int (*eav_enable_get)(int unit,uint32 port,uint32 *enable);
	int (*eav_link_status_set)(int unit,uint32 port,uint32 link);
	int (*eav_link_status_get)(int unit,uint32 port,uint32 *link);
	int (*eav_egress_timestamp_get)(int unit,uint32 port,uint32 *param);
	int (*eav_time_sync_set)(int unit,uint32 type,uint32 p0,uint32 p1);
	int (*eav_time_sync_get)(int unit,uint32 type,uint32 *p0,uint32 *p1);
	int (*eav_queue_control_set)(int unit,uint32 port,uint32 type,uint32 param);
	int (*eav_queue_control_get)(int unit,uint32 port,uint32 type,uint32 *param);
	int (*eav_time_sync_mac_set)(int unit,uint8 *mac,uint16 ethertype);
	int (*eav_time_sync_mac_get)(int unit,uint8 *mac,uint16 *ethertype);
	int (*dos_enable_set)(int unit,uint32 type,uint32 param);
	int (*dos_enable_get)(int unit,uint32 type,uint32 *param);
	int (*dos_event_bitmap_get)(int unit,uint32 op,uint32 *event_bitmap);
	int (*vm_init)(int unit);
	int (*vm_deinit)(int unit);
	int (*vm_field_get)(int unit,uint32 mem_type,uint32 field_type,drv_vm_entry_t *entry,uint32 *fld_val);
	int (*vm_field_set)(int unit,uint32 mem_type,uint32 field_type,drv_vm_entry_t *entry,uint32 *fld_val);
	int (*vm_action_get)(int unit,uint32 action,drv_vm_entry_t *entry,uint32 *act_param);
	int (*vm_action_set)(int unit,uint32 action,drv_vm_entry_t *entry,uint32 act_param);
	int (*vm_entry_read)(int unit,uint32 index,uint32 ram_type,drv_vm_entry_t *entry);
	int (*vm_entry_write)(int unit,uint32 index,uint32 ram_type,drv_vm_entry_t *entry);
	int (*vm_qset_get)(int unit,uint32 qual,drv_vm_entry_t *entry,uint32 *val);
	int (*vm_qset_set)(int unit,uint32 qual,drv_vm_entry_t *entry,uint32 val);
	int (*vm_format_id_select)(int unit,drv_vm_entry_t *entry,uint32 *format_id,uint32 flags);
	int (*vm_format_to_qset)(int unit,uint32 mem_type,uint32 id,drv_vm_entry_t *entry);
	int (*vm_range_set)(int unit,uint32 id,uint32 min,uint32 max);
	int (*vm_flow_alloc)(int unit,uint32 type,int *flow_id);
	int (*vm_flow_free)(int unit,int flow_id);
	int (*vm_ranger_inc)(int unit,int ranger_id);
	int (*vm_ranger_dec)(int unit,int ranger_id);
	int (*vm_ranger_count_get)(int unit,int ranger_id,uint32 *count);
	int (*mcrep_vpgrp_vport_config_set)(int unit,uint32 mc_group,uint32 port,drv_mcrep_control_flag_t op,int *param);
	int (*mcrep_vpgrp_vport_config_get)(int unit,uint32 mc_group,uint32 port,drv_mcrep_control_flag_t op,int *param);
	int (*mcrep_vport_config_set)(int unit,uint32 port,drv_mcrep_control_flag_t op,uint32 vport,uint32 vid);
	int (*mcrep_vport_config_get)(int unit,uint32 port,drv_mcrep_control_flag_t op,uint32 *vport,uint32 *vid);
	int (*mcrep_vport_vid_search)(int unit,uint32 port,uint32 *vport,int *param);
	int (*dev_control_set)(int unit,uint32 *ctrl_cnt,uint32 *type_list,int *value_list);
	int (*dev_control_get)(int unit,uint32 *ctrl_cnt,uint32 *type_list,int *value_list);
	int (*arl_learn_count_set)(int unit,uint32 port,uint32 type,int value);
	int (*arl_learn_count_get)(int unit,uint32 port,uint32 type,int *value);
	int (*fp_init)(int unit,int stage_id);
	int (*fp_deinit)(int unit,int stage_id);
	int (*fp_qual_value_set)(int unit,int stage_id,drv_field_qualify_t qual,void *drv_entry,uint32 *p_data,uint32 *p_mask);
	int (*fp_qual_value_get)(int unit,int stage_id,drv_field_qualify_t qual,void *drv_entry,uint32 *p_data,uint32 *p_mask);
	int (*fp_udf_value_set)(int unit,int stage_id,uint32 udf_idex,void *drv_entry,uint32 *p_data,uint32 *p_mask);
	int (*fp_udf_value_get)(int unit,int stage_id,uint32 udf_idex,void *drv_entry,uint32 *p_data,uint32 *p_mask);
	int (*fp_entry_mem_control)(int unit,int stage_id,int op,void *src_entry,void *dst_entry,void **alloc_entry);
	int (*fp_entry_tcam_control)(int unit,int stage_id,void *drv_entry,int op,int param1,void *param2);
	int (*fp_action_conflict)(int unit,int stage_id,drv_field_action_t act1,drv_field_action_t act2);
	int (*fp_action_support_check)(int unit,int stage_id,drv_field_action_t action);
	int (*fp_action_add)(int unit,int stage_id,void *drv_entry,drv_field_action_t action,uint32 param0,uint32 param1);
	int (*fp_action_remove)(int unit,int stage_id,void *drv_entry,drv_field_action_t action,uint32 param0,uint32 param1);
	int (*fp_selcode_mode_get)(int unit,int stage_id,void *qset,int mode,int8 *slice_id,uint32 *slice_map,void **drv_entry);
	int (*fp_selcode_to_qset)(int unit,int stage_id,int slice_id,void *qset);
	int (*fp_qualify_support)(int unit,int stage_id,void *qset);
	int (*fp_id_control)(int unit,int type,int op,int flags,int *id,uint32 *count);
	int (*fp_tcam_parity_check)(int unit,drv_fp_tcam_checksum_t *drv_fp_tcam_chksum);
	int (*fp_policer_control)(int unit,int stage_id,int op,void *entry,drv_policer_config_t *policer_cfg);
	int (*fp_stat_support_check)(int unit,int stage_id,int op,int param0,void *mode);
	int (*fp_stat_type_get)(int unit,int stage_id,drv_policer_mode_t policer_mode,drv_field_stat_t stat,int *type1,int *type2,int *type3);
	int (*port_block_get)(int unit,int port,uint32 block_type,soc_pbmp_t *egress_pbmp);
	int (*port_block_set)(int unit,int port,uint32 block_type,soc_pbmp_t egress_pbmp);
	int (*led_func_get)(int unit,int led_group,uint32 *led_functions);
	int (*led_func_set)(int unit,int led_group,uint32 led_functions);
	int (*led_funcgrp_select_get)(int unit,int port,int *led_group);
	int (*led_funcgrp_select_set)(int unit,int port,int led_group);
	int (*led_mode_get)(int unit,int port,uint32 *led_mode);
	int (*led_mode_set)(int unit,int port,uint32 led_mode);
	int (*igmp_mld_snoop_mode_get)(int unit,int type,int *mode);
	int (*igmp_mld_snoop_mode_set)(int unit,int type,int mode);
} drv_if_t;

extern int drv_reg_read(int unit,uint32 addr,void *data,int len);
extern int drv_reg_write(int unit,uint32 addr,void *data,int len);
extern int drv_reg_length_get(int unit,uint32 reg);
extern uint32 drv_reg_addr(int unit,uint32 reg,int port,int index);
extern int drv_reg_field_set(int unit,uint32 reg,uint32 *regbuf,uint32 field,uint32 *fldbuf);
extern int drv_reg_field_get(int unit,uint32 reg,uint32 *regbuf,uint32 field,uint32 *fldbuf);
extern int drv_miim_read(int unit,uint8 phyid,uint8 phyaddr,uint16 *data);
extern int drv_miim_write(int unit,uint8 phyid,uint8 phyaddr,uint16 data);
extern int drv_phy_addr_set(int unit,int **map);
extern int drv_mac_driver_set(int unit,uint32 **p);
extern int drv_mem_length_get(int unit,uint32 mem,uint32 *data);
extern int drv_mem_width_get(int unit,uint32 mem,uint32 *data);
extern int drv_mem_read(int unit,uint32 mem,uint32 entry_id,uint32 count,uint32 *entry);
extern int drv_mem_write(int unit,uint32 mem,uint32 entry_id,uint32 count,uint32 *entry);
extern int drv_mem_field_get(int unit,uint32 mem,uint32 field_index,uint32 *entry,uint32 *fld_data);
extern int drv_mem_field_set(int unit,uint32 mem,uint32 field_index,uint32 *entry,uint32 *fld_data);
extern int drv_mem_clear(int unit,uint32 mem);
extern int drv_mem_search(int unit,uint32 mem,uint32 *key,uint32 *entry,uint32 *entry1,uint32 flags);
extern int drv_mem_insert(int unit,uint32 mem,uint32 *entry,uint32 flags);
extern int drv_mem_delete(int unit,uint32 mem,uint32 *entry,uint32 flags);
extern int drv_mem_cache_get(int unit,uint32 mem,uint32 *enable);
extern int drv_mem_cache_set(int unit,uint32 mem,uint32 enable);
extern int drv_mem_move(int unit,uint32 mem,int src_index,int dest_index,int count,int flag);
extern int drv_mem_fill(int unit,uint32 mem,int entry_id,int count,uint32 *entry);
extern int drv_counter_thread_set(int unit,uint32 thread_op,uint32 flags,int interval,soc_pbmp_t bmp);
extern int drv_counter_set(int unit,soc_pbmp_t bmp,uint32 counter_type,uint64 val);
extern int drv_counter_get(int unit,uint32 port,uint32 counter_type,uint64 *val);
extern int drv_counter_reset(int unit);
extern int drv_vlan_mode_set(int unit,uint32 mode);
extern int drv_vlan_mode_get(int unit,uint32 *mode);
extern int drv_port_vlan_pvid_set(int unit,uint32 port,uint32 outer_tag,uint32 inner_tag);
extern int drv_port_vlan_pvid_get(int unit,uint32 port,uint32 *outer_tag,uint32 *inner_tag);
extern int drv_port_vlan_set(int unit,uint32 port,soc_pbmp_t bmp);
extern int drv_port_vlan_get(int unit,uint32 port,soc_pbmp_t *bmp);
extern int drv_vlan_prop_set(int unit,uint32 prop_type,uint32 prop_val);
extern int drv_vlan_prop_get(int unit,uint32 prop_type,uint32 *prop_val);
extern int drv_vlan_prop_port_enable_set(int unit,uint32 prop_type,soc_pbmp_t bmp,uint32 val);
extern int drv_vlan_prop_port_enable_get(int unit,uint32 prop_type,uint32 port_n,uint32 *val);
extern int drv_vlan_vt_set(int unit,uint32 prop_type,uint32 vid,uint32 port,uint32 prop_val);
extern int drv_vlan_vt_get(int unit,uint32 prop_type,uint32 vid,uint32 port,uint32 *prop_val);
extern int drv_vlan_vt_add(int unit,uint32 vt_type,uint32 port,uint32 cvid,uint32 svid,uint32 pri,uint32 mode);
extern int drv_vlan_vt_delete(int unit,uint32 vt_type,uint32 port,uint32 vid);
extern int drv_vlan_vt_delete_all(int unit,uint32 vt_type);
extern int drv_trunk_set(int unit,int tid,soc_pbmp_t bmp,uint32 flag,uint32 hash_op);
extern int drv_trunk_get(int unit,int tid,soc_pbmp_t *bmp,uint32 flag,uint32 *hash_op);
extern int drv_trunk_hash_field_add(int unit,uint32 field_type);
extern int drv_trunk_hash_field_remove(int unit,uint32 field_type);
extern int drv_queue_mode_set(int unit,soc_pbmp_t bmp,uint32 mode);
extern int drv_queue_mode_get(int unit,uint32 port,uint32 *mode);
extern int drv_queue_count_set(int unit,uint32 port_type,uint8 count);
extern int drv_queue_count_get(int unit,uint32 port_type,uint8 *count);
extern int drv_queue_WRR_weight_set(int unit,uint32 port_type,uint8 queue,uint32 weight);
extern int drv_queue_WRR_weight_get(int unit,uint32 port_type,uint8 queue,uint32 *weight);
extern int drv_queue_prio_set(int unit,uint32 port,uint8 prio,uint8 queue_n);
extern int drv_queue_prio_get(int unit,uint32 port,uint8 prio,uint8 *queue_n);
extern int drv_queue_tos_set(int unit,uint8 precedence,uint8 queue_n);
extern int drv_queue_tos_get(int unit,uint8 precedence,uint8 *queue_n);
extern int drv_queue_dfsv_set(int unit,uint8 code_point,uint8 queue_n);
extern int drv_queue_dfsv_get(int unit,uint8 code_point,uint8 *queue_n);
extern int drv_queue_mapping_type_set(int unit,soc_pbmp_t bmp,uint32 mapping_type,uint8 enable);
extern int drv_queue_mapping_type_get(int unit,uint32 port,uint32 mapping_type,uint8 *enable);
extern int drv_age_timer_set(int unit,uint32 enable,uint32 age_time);
extern int drv_age_timer_get(int unit,uint32 *enable,uint32 *age_time);
extern int drv_mac_set(int unit,soc_pbmp_t pbmp,uint32 mac_type,uint8 *mac,uint32 bpdu_idx);
extern int drv_mac_get(int unit,uint32 port,uint32 mac_type,soc_pbmp_t *bmp,uint8 *mac);
extern int drv_mirror_set(int unit,uint32 enable,soc_pbmp_t mport_pbmp,soc_pbmp_t ingress_pbmp,soc_pbmp_t engress_pbmp);
extern int drv_mirror_get(int unit,uint32 *enable,soc_pbmp_t *mport_pbmp,soc_pbmp_t *ingress_pbmp,soc_pbmp_t *engress_pbmp);
extern int drv_port_oper_mode_set(int unit,soc_pbmp_t bmp,uint32 oper_mode);
extern int drv_port_oper_mode_get(int unit,int port_n,uint32 *oper_mode);
extern int drv_port_set(int unit,soc_pbmp_t bmp,uint32 prop_type,uint32 prop_val);
extern int drv_port_get(int unit,int port_n,uint32 prop_type,uint32 *prop_val);
extern int drv_port_advertise_set(int unit,soc_pbmp_t bmp,uint32 prop_mask);
extern int drv_port_advertise_get(int unit,int port_n,uint32 *prop_val);
extern int drv_port_status_get(int unit,uint32 port,uint32 status_type,uint32 *val);
extern int drv_port_sw_mac_update(int unit,soc_pbmp_t bmp);
extern int drv_port_pri_mapop_set(int unit,int port,int op_type,uint32 pri_old,uint32 cfi_old,uint32 pri_new,uint32 cfi_new);
extern int drv_port_pri_mapop_get(int unit,int port,int op_type,uint32 pri_old,uint32 cfi_old,uint32 *pri_new,uint32 *cfi_new);
extern int drv_port_bitmap_get(int unit,uint32 port_type,soc_pbmp_t *bmp);
extern int drv_port_cross_connect_set(int unit,uint32 port,soc_pbmp_t bmp);
extern int drv_port_cross_connect_get(int unit,uint32 port,soc_pbmp_t *bmp);
extern int drv_security_set(int unit,soc_pbmp_t bmp,uint32 state,uint32 mask);
extern int drv_security_get(int unit,uint32 port,uint32 *state,uint32 *mask);
extern int drv_security_egress_set(int unit,soc_pbmp_t bmp,int enable);
extern int drv_security_egress_get(int unit,int port,int *enable);
extern int drv_security_eap_control_set(int unit,uint32 type,uint32 value);
extern int drv_security_eap_control_get(int unit,uint32 type,uint32 *value);
extern int drv_mstp_config_set(int unit,uint32 vlan_id,uint32 mstp_gid);
extern int drv_mstp_config_get(int unit,uint32 vlan_id,uint32 *mstp_gid);
extern int drv_mstp_port_set(int unit,uint32 mstp_gid,uint32 port,uint32 port_state);
extern int drv_mstp_port_get(int unit,uint32 mstp_gid,uint32 port,uint32 *port_state);
extern int drv_trap_set(int unit,soc_pbmp_t pbmp,uint32 trap_mask);
extern int drv_trap_get(int unit,soc_port_t port,uint32 *trap_mask);
extern int drv_snoop_set(int unit,uint32 snoop_mask);
extern int drv_snoop_get(int unit,uint32 *snoop_mask);
extern int drv_rate_config_set(int unit,soc_pbmp_t pbmp,uint32 config_type,uint32 value);
extern int drv_rate_config_get(int unit,uint32 port,uint32 config_type,uint32 *value);
extern int drv_rate_set(int unit,soc_pbmp_t pbmp,uint8 queue_n,int direction,uint32 kbits_sec_min,uint32 kbits_sec_max,uint32 burst_size);
extern int drv_rate_get(int unit,uint32 port,uint8 queue_n,int direction,uint32 *kbits_sec_min,uint32 *kbits_sec_max,uint32 *burst_size);
extern int drv_storm_control_enable_set(int unit,uint32 port,uint8 enable);
extern int drv_storm_control_enable_get(int unit,uint32 port,uint8 *enable);
extern int drv_storm_control_set(int unit,soc_pbmp_t pbmp,uint32 type,uint32 limit,uint32 burst_size);
extern int drv_storm_control_get(int unit,uint32 port,uint32 *type,uint32 *limit,uint32 *burst_size);
extern int drv_dev_prop_get(int unit,uint32 prop_type,uint32 *prop_val);
extern int drv_dev_prop_set(int unit,uint32 prop_type,uint32 prop_val);
extern int drv_mcast_init(int unit);
extern int drv_mcast_to_marl(int unit,uint32 *marl_entry,uint32 *mcaddr);
extern int drv_mcast_from_marl(int unit,uint32 *mcaddr,uint32 *marl_entry);
extern int drv_mcast_bmp_get(int unit,uint32 *entry,soc_pbmp_t *bmp);
extern int drv_mcast_bmp_set(int unit,uint32 *entry,soc_pbmp_t bmp,uint32 flag);
extern int drv_arl_table_process(int unit,uint32 *key,void *hw_arl,void *sw_arl);
extern int drv_arl_sync(int unit,uint32 *key,void *old_arl,void *new_arl);
extern int drv_arl_learn_enable_set(int unit,soc_pbmp_t pbmp,uint32 mode);
extern int drv_arl_learn_enable_get(int unit,soc_port_t port,uint32 *mode);
extern int drv_queue_port_prio_to_queue_set(int unit,uint8 port,uint8 prio,uint8 queue_n);
extern int drv_queue_port_prio_to_queue_get(int unit,uint8 port,uint8 prio,uint8 *queue_n);
extern int drv_queue_port_dfsv_set(int unit,uint8 port,uint8 dscp,uint8 prio,uint8 queue_n);
extern int drv_queue_port_dfsv_get(int unit,uint8 port,uint8 dscp,uint8 *prio,uint8 *queue_n);
extern int drv_queue_prio_remap_set(int unit,uint32 port,uint8 pre_prio,uint8 prio);
extern int drv_queue_prio_remap_get(int unit,uint32 port,uint8 pre_prio,uint8 *prio);
extern int drv_queue_dfsv_remap_set(int unit,uint8 dscp,uint8 prio);
extern int drv_queue_dfsv_remap_get(int unit,uint8 dscp,uint8 *prio);
extern int drv_queue_dfsv_unmap_set(int unit,uint8 prio,uint8 dscp);
extern int drv_queue_dfsv_unmap_get(int unit,uint8 prio,uint8 *dscp);
extern int drv_queue_rx_reason_set(int unit,uint8 reason,uint32 queue);
extern int drv_queue_rx_reason_get(int unit,uint8 reason,uint32 *queue);
extern int drv_queue_port_txq_pause_set(int unit,uint32 port,uint8 queue_n,uint8 enable);
extern int drv_queue_port_txq_pause_get(int unit,uint32 port,uint8 queue_n,uint8 *enable);
extern int drv_queue_qos_control_set(int unit,uint32 type,uint32 state);
extern int drv_queue_qos_control_get(int unit,uint32 type,uint32 *state);
extern int drv_cfp_init(int unit);
extern int drv_cfp_action_get(int unit,uint32 *action,drv_cfp_entry_t *entry,uint32 *act_param);
extern int drv_cfp_action_set(int unit,uint32 action,drv_cfp_entry_t *entry,uint32 act_param1,uint32 act_param2);
extern int drv_cfp_control_get(int unit,uint32 control_type,uint32 param1,uint32 *param2);
extern int drv_cfp_control_set(int unit,uint32 control_type,uint32 param1,uint32 param2);
extern int drv_cfp_entry_read(int unit,uint32 index,uint32 ram_type,drv_cfp_entry_t *entry);
extern int drv_cfp_entry_search(int unit,uint32 flags,uint32 *index,drv_cfp_entry_t *entry);
extern int drv_cfp_entry_write(int unit,uint32 index,uint32 ram_type,drv_cfp_entry_t *entry);
extern int drv_cfp_field_get(int unit,uint32 mem_type,uint32 field_type,drv_cfp_entry_t *entry,uint32 *fld_val);
extern int drv_cfp_field_set(int unit,uint32 mem_type,uint32 field_type,drv_cfp_entry_t *entry,uint32 *fld_val);
extern int drv_cfp_meter_rate_transform(int unit,uint32 kbits_sec,uint32 kbits_burst,uint32 *bucket_size,uint32 *ref_cnt,uint32 *ref_unit);
extern int drv_cfp_meter_get(int unit,drv_cfp_entry_t *entry,uint32 *kbits_sec,uint32 *kbits_burst);
extern int drv_cfp_meter_set(int unit,drv_cfp_entry_t *entry,uint32 kbits_sec,uint32 kbits_burst);
extern int drv_cfp_qset_get(int unit,uint32 qual,drv_cfp_entry_t *entry,uint32 *val);
extern int drv_cfp_qset_set(int unit,uint32 qual,drv_cfp_entry_t *entry,uint32 val);
extern int drv_cfp_slice_id_select(int unit,drv_cfp_entry_t *entry,uint32 *slice_id,uint32 flags);
extern int drv_cfp_slice_to_qset(int unit,uint32 slice_id,drv_cfp_entry_t *entry);
extern int drv_cfp_stat_get(int unit,uint32 stat_type,uint32 index,uint32 *counter);
extern int drv_cfp_stat_set(int unit,uint32 stat_type,uint32 index,uint32 counter);
extern int drv_cfp_udf_get(int unit,uint32 port,uint32 udf_index,uint32 *offset,uint32 *base);
extern int drv_cfp_udf_set(int unit,uint32 port,uint32 udf_index,uint32 offset,uint32 base);
extern int drv_cfp_ranger(int unit,uint32 flags,uint32 min,uint32 max);
extern int drv_cfp_range_set(int unit,uint32 type,uint32 id,uint32 param1,uint32 param2);
extern int drv_cfp_range_get(int unit,uint32 type,uint32 id,uint32 *param1,uint32 *param2);
extern int drv_cfp_sub_qual_by_udf(int unit,int enable,int slice_id,uint32 sub_qual,drv_cfp_qual_udf_info_t *qual_udf_info);
extern int drv_eav_control_set(int unit,uint32 type,uint32 param);
extern int drv_eav_control_get(int unit,uint32 type,uint32 *param);
extern int drv_eav_enable_set(int unit,uint32 port,uint32 enable);
extern int drv_eav_enable_get(int unit,uint32 port,uint32 *enable);
extern int drv_eav_link_status_set(int unit,uint32 port,uint32 link);
extern int drv_eav_link_status_get(int unit,uint32 port,uint32 *link);
extern int drv_eav_egress_timestamp_get(int unit,uint32 port,uint32 *param);
extern int drv_eav_time_sync_set(int unit,uint32 type,uint32 p0,uint32 p1);
extern int drv_eav_time_sync_get(int unit,uint32 type,uint32 *p0,uint32 *p1);
extern int drv_eav_queue_control_set(int unit,uint32 port,uint32 type,uint32 param);
extern int drv_eav_queue_control_get(int unit,uint32 port,uint32 type,uint32 *param);
extern int drv_eav_time_sync_mac_set(int unit,uint8 *mac,uint16 ethertype);
extern int drv_eav_time_sync_mac_get(int unit,uint8 *mac,uint16 *ethertype);
extern int drv_dos_enable_set(int unit,uint32 type,uint32 param);
extern int drv_dos_enable_get(int unit,uint32 type,uint32 *param);
extern int drv_dos_event_bitmap_get(int unit,uint32 op,uint32 *event_bitmap);
extern int drv_vm_init(int unit);
extern int drv_vm_deinit(int unit);
extern int drv_vm_field_get(int unit,uint32 mem_type,uint32 field_type,drv_vm_entry_t *entry,uint32 *fld_val);
extern int drv_vm_field_set(int unit,uint32 mem_type,uint32 field_type,drv_vm_entry_t *entry,uint32 *fld_val);
extern int drv_vm_action_get(int unit,uint32 action,drv_vm_entry_t *entry,uint32 *act_param);
extern int drv_vm_action_set(int unit,uint32 action,drv_vm_entry_t *entry,uint32 act_param);
extern int drv_vm_entry_read(int unit,uint32 index,uint32 ram_type,drv_vm_entry_t *entry);
extern int drv_vm_entry_write(int unit,uint32 index,uint32 ram_type,drv_vm_entry_t *entry);
extern int drv_vm_qset_get(int unit,uint32 qual,drv_vm_entry_t *entry,uint32 *val);
extern int drv_vm_qset_set(int unit,uint32 qual,drv_vm_entry_t *entry,uint32 val);
extern int drv_vm_format_id_select(int unit,drv_vm_entry_t *entry,uint32 *format_id,uint32 flags);
extern int drv_vm_format_to_qset(int unit,uint32 mem_type,uint32 id,drv_vm_entry_t *entry);
extern int drv_vm_range_set(int unit,uint32 id,uint32 min,uint32 max);
extern int drv_vm_flow_alloc(int unit,uint32 type,int *flow_id);
extern int drv_vm_flow_free(int unit,int flow_id);
extern int drv_vm_ranger_inc(int unit,int ranger_id);
extern int drv_vm_ranger_dec(int unit,int ranger_id);
extern int drv_vm_ranger_count_get(int unit,int ranger_id,uint32 *count);
extern int drv_mcrep_vpgrp_vport_config_set(int unit,uint32 mc_group,uint32 port,drv_mcrep_control_flag_t op,int *param);
extern int drv_mcrep_vpgrp_vport_config_get(int unit,uint32 mc_group,uint32 port,drv_mcrep_control_flag_t op,int *param);
extern int drv_mcrep_vport_config_set(int unit,uint32 port,drv_mcrep_control_flag_t op,uint32 vport,uint32 vid);
extern int drv_mcrep_vport_config_get(int unit,uint32 port,drv_mcrep_control_flag_t op,uint32 *vport,uint32 *vid);
extern int drv_mcrep_vport_vid_search(int unit,uint32 port,uint32 *vport,int *param);
extern int drv_dev_control_set(int unit,uint32 *ctrl_cnt,uint32 *type_list,int *value_list);
extern int drv_dev_control_get(int unit,uint32 *ctrl_cnt,uint32 *type_list,int *value_list);
extern int drv_arl_learn_count_set(int unit,uint32 port,uint32 type,int value);
extern int drv_arl_learn_count_get(int unit,uint32 port,uint32 type,int *value);
extern int drv_fp_init(int unit,int stage_id);
extern int drv_fp_deinit(int unit,int stage_id);
extern int drv_fp_qual_value_set(int unit,int stage_id,drv_field_qualify_t qual,void *drv_entry,uint32 *p_data,uint32 *p_mask);
extern int drv_fp_qual_value_get(int unit,int stage_id,drv_field_qualify_t qual,void *drv_entry,uint32 *p_data,uint32 *p_mask);
extern int drv_fp_udf_value_set(int unit,int stage_id,uint32 udf_idex,void *drv_entry,uint32 *p_data,uint32 *p_mask);
extern int drv_fp_udf_value_get(int unit,int stage_id,uint32 udf_idex,void *drv_entry,uint32 *p_data,uint32 *p_mask);
extern int drv_fp_entry_mem_control(int unit,int stage_id,int op,void *src_entry,void *dst_entry,void **alloc_entry);
extern int drv_fp_entry_tcam_control(int unit,int stage_id,void *drv_entry,int op,int param1,void *param2);
extern int drv_fp_action_conflict(int unit,int stage_id,drv_field_action_t act1,drv_field_action_t act2);
extern int drv_fp_action_support_check(int unit,int stage_id,drv_field_action_t action);
extern int drv_fp_action_add(int unit,int stage_id,void *drv_entry,drv_field_action_t action,uint32 param0,uint32 param1);
extern int drv_fp_action_remove(int unit,int stage_id,void *drv_entry,drv_field_action_t action,uint32 param0,uint32 param1);
extern int drv_fp_selcode_mode_get(int unit,int stage_id,void *qset,int mode,int8 *slice_id,uint32 *slice_map,void **drv_entry);
extern int drv_fp_selcode_to_qset(int unit,int stage_id,int slice_id,void *qset);
extern int drv_fp_qualify_support(int unit,int stage_id,void *qset);
extern int drv_fp_id_control(int unit,int type,int op,int flags,int *id,uint32 *count);
extern int drv_fp_tcam_parity_check(int unit,drv_fp_tcam_checksum_t *drv_fp_tcam_chksum);
extern int drv_fp_policer_control(int unit,int stage_id,int op,void *entry,drv_policer_config_t *policer_cfg);
extern int drv_fp_stat_support_check(int unit,int stage_id,int op,int param0,void *mode);
extern int drv_fp_stat_type_get(int unit,int stage_id,drv_policer_mode_t policer_mode,drv_field_stat_t stat,int *type1,int *type2,int *type3);
extern int drv_port_block_get(int unit,int port,uint32 block_type,soc_pbmp_t *egress_pbmp);
extern int drv_port_block_set(int unit,int port,uint32 block_type,soc_pbmp_t egress_pbmp);
extern int drv_led_func_get(int unit,int led_group,uint32 *led_functions);
extern int drv_led_func_set(int unit,int led_group,uint32 led_functions);
extern int drv_led_funcgrp_select_get(int unit,int port,int *led_group);
extern int drv_led_funcgrp_select_set(int unit,int port,int led_group);
extern int drv_led_mode_get(int unit,int port,uint32 *led_mode);
extern int drv_led_mode_set(int unit,int port,uint32 led_mode);
extern int drv_igmp_mld_snoop_mode_get(int unit,int type,int *mode);
extern int drv_igmp_mld_snoop_mode_set(int unit,int type,int mode);
#endif /* _DRV_IF_H */
